import {createStyles, Theme, withStyles} from '@material-ui/core/styles';
import {WithStyles} from "@material-ui/core/styles/withStyles";
import * as React from "react";
import { Tabs } from 'antd';
import Field from "./Field";
import Res from "./Res";

const TabPane = Tabs.TabPane;

function callback(key:any) {
}

const styles = (theme: Theme) => createStyles<"root">({
    root: {
        width:"30vw",
        height:"470px",
        // background:"#fff",
        padding:"5px",

    }
});

interface Iprops extends WithStyles<typeof styles> {
}

class LeftContent extends React.Component<Iprops> {

    public render() {
        const {classes} = this.props;
        return (
            <div className={classes.root}>
                <br/><br/><br/>
                <Tabs onChange={callback} type="card" >
                    <TabPane tab="登录" key="1">
                        <br/><Field />
                    </TabPane>
                    <TabPane tab="注册" key="2">
                        <br/><Res /></TabPane>
                </Tabs>,
            </div>);
    }
}

export default withStyles(styles)(LeftContent);
